CC = clang++
CFLAGS = -g -O2
DEBUG_FLAGS = -g -O2 -DDEBUG
DEPS = $(shell find ./include/ -name "*.h")
SRCS = $(shell find ./src/ -name "*.cpp")
O = $(SRCS:%.cpp=%.o)
NAME = shopping

.PHONY = clean run

$(NAME) :$(O)
	$(CC) $(CFLAGS) $(O) -o $(NAME)
	touch $(NAME)

debug :$(O)
	$(CC) $(DEBUG_FLAGS) $(O) -o $(NAME)
	gdb ./$(NAME)

%.o:%.cpp
	$(CC) -c $^ -O2 -o $@ 

clean:
	rm -rf $(O) $(NAME)

run: $(NAME)
	./$(NAME)
